<template>
	<view>
		<!-- 头部 -->
		<view class="top">
			<view class="top_tow">
				<view class="top_one">
					<view class="top_three">
						<view class="ico">
							<text class="iconfont icon-tiyankechengbiao icon"></text>
						</view>
						<view class="ke">
							课程
						</view>
					</view>
					<view class="top_three">
						<view class="ico">
							<text class="iconfont icon-dashike icon"></text>
						</view>
						<view class="key">
							大师课
						</view>
					</view>
					<view class="top_three">
						<view class="ico">
							<text class="iconfont icon-kechengbiao icon"></text>
						</view>
						<view class="key">
							体验课
						</view>
					</view>
				</view>
			</view>
		</view>
		<!-- 推荐课程 -->
		<view class="jian">
			<view class="tuijian">
			
					<view class="tui_one">
						<view class="">
							推荐课程
						</view>
						<view class="">
							全部52个课程
							<text class="iconfont icon-xiangyoujiantou"></text>
						</view>
					</view>
					
					<view class="tui_tow">
						<view class="tui_three" v-for="(item,index) in cpur" :key="index">
							<image :src="Image+item.teacherPhoto" mode=""></image>
							<text>{{item.name}}</text>
						</view>
			
					</view>
			
			</view>
		</view>
		<!-- 今日课程 -->
		<view class="jian">
			<view class="tuijian">
					<view class="jin_one">
						<view class="">
							今日课程
						</view>
						<view class="">
							全部52个课程
							<text class="iconfont icon-xiangyoujiantou"></text>
						</view>
					</view>
					
					<view class="jin_tow">
						<view class="jin_three" v-for="(item,index) in courses" :key="index">
							<view class="img">
								
							<!-- 	<image src="../../static/images/kecheng_08.jpg" mode=""></image> -->
								<image :src="Image+item.teacherPhoto" mode=""></image>
							</view>
							<view class="jin_for">
								<view class="">
									{{item.name}}
								</view>
								<view class="">
									【D】{{item.address}}
								</view>
								<view class="">
									周三    {{item.courseStartTime}} - {{item.courseEndTime}}
								</view>
							</view>
							<view class="jin_right">
								预约
							</view>
						</view>
			
	
					</view>
					
			</view>
		</view>
	
		
	</view>
</template>

<script>
	import {courseslist} from '@/apis/index'
	import '../../static/css/iconfont/iconfont.css'
	export default {
		data() {
			return {
				Image:'http://apis.90000p.com/fkm/upload/',
				query:{
					page:1,
					psize:4,
					type:0
				},
				querys:{
					page:1,
					psize:4,
					type:1
				},
				courses:[],
				cpur:[]
			};
		},
		onLoad() {
		this.getcourseslist()
		this.getcourses()
		},
		methods:{
			async getcourseslist(){
				let res = await courseslist(this.query)
				console.log(res);
				this.courses=res.data.list
			},
			async getcourses(){
				let res = await courseslist(this.querys)
				console.log(res);
				this.cpur=res.data.list
			}
		}
	}
</script>

<style lang="less">
@import url(./home.less);
</style>
